﻿namespace IntellectShop.Common
{
	using System;
	using System.ComponentModel.DataAnnotations;
	using System.Text;

	public partial class Feedback
	{
		[ScaffoldColumn(false)]
		public int FeedbackID { get; set; }

		[DisplayNameLocalized("FeedbackOwnerID")]
		public string FeedbackOwnerID { get; set; }

		[DisplayNameLocalized("Author")]
		public string Author { get; set; }

		[DisplayNameLocalized("Email")]
		public string Email { get; set; }

		[DisplayNameLocalized("Body")]
		[Required(ErrorMessageResourceName = "BodyIsRequired", ErrorMessageResourceType=typeof(Resources.Errors))]
		public string Body { get; set; }

		[DisplayNameLocalized("CreatedBy")]
		public string CreatedBy { get; set; }

		[DisplayNameLocalized("Created")]
		public DateTime? Created { get; set; }

		[DisplayNameLocalized("Updated")]
		public DateTime? Updated { get; set; }

		[DisplayNameLocalized("UpdatedBy")]
		public string UpdatedBy { get; set; }

		public string Print()
		{
			StringBuilder buf = new StringBuilder();
			buf.AppendFormat("<p><strong>{0}</strong>: {1}</p>", Resources.Resources.Author, this.Author);
			buf.AppendFormat("<p><strong>{0}</strong>: {1}</p>", Resources.Resources.Email, this.Email);
			buf.AppendFormat("<p><strong>{0}</strong>: {1}</p>", Resources.Resources.Body, this.Body);
			buf.Append("<br/>");

			return buf.ToString();
		}
	}
}
